package com.heima.apis.article.fallback;

import com.heima.apis.article.IArticleClient;
import com.heima.common.dtos.ResponseResult;
import com.heima.common.enums.AppHttpCodeEnum;
import com.heima.common.exception.CustomException;
import com.heima.model.article.dtos.ArticleDto;
import org.springframework.stereotype.Component;

@Component
public class IArticleClientFallback implements IArticleClient {
    @Override
    public ResponseResult<Long> saveArticle(ArticleDto dto) {
        //进行保存数据失败后的操作
        throw new CustomException(AppHttpCodeEnum.SERVER_ERROR);
    }
}
